package com.owen.blog.dao;

import com.owen.blog.domain.ContentDO;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 文章内容
 */
@Mapper
public interface ContentDao {

	ContentDO get(String cid);

	List<ContentDO> list(Map<String,Object> map);

	int count(Map<String,Object> map);

	int save(ContentDO content);

	int update(ContentDO content);

	int remove(String cid);

	int batchRemove(String[] cids);

	/**
	 * 源码下载次数自增一
	 * @param cid
	 * @return
	 */
	int updateSourceDownloadCountIncr(@Param("cid") String cid);
}
